﻿/* 
    Module: Downloading Http Response
    Autor:  Master HaKu
    Date:   2012/03/12
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.IO;
using System.Text;

namespace CsharpTrainer.Core.Extensions
{
    public class HtmlHelperExtension
    {
        public static string GetResponse(string url)
        {
            WebClient client = new WebClient();
            client.Encoding = Encoding.UTF8;
            string reply = client.DownloadString(url);
            //client.Credentials = CredentialCache.DefaultCredentials;
            
            client.Dispose();

            return reply;
        }
    }
}
